<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in</name>
<id>-1</id>
<cardCount>1</cardCount>
<cardID>2866</cardID>
<listID>2154</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>on updateglobal player,errif player is 1 thenif err is 0 thenset hilite of card button "player 1" to falseset hilite of card button "player 2" to trueput empty into line 1 to 2 of card field 1put empty into line 1 to 2 of card field 2put "Your turn!" & return & "==========" & return into line 1 of card field 2put "Wait!" & return & "==========" ¬& return into line 1 of card field 1put 2 into playerend ifelseif err is 0 thenset hilite of card button "player 2" to falseset hilite of card button "player 1" to trueput empty into line 1 to 2 of card field 1put empty into line 1 to 2 of card field 2put "Your turn!" & return & "==========" & return into line 1 of card field 1put "Wait!" & return ¬& "==========" & return into line 1 of card field 2put 1 into playerend ifend ifput 0 into errupdatescoreend updateon updatescoreglobal board,play1tot,play2totput 0 into play1totput 0 into play2totrepeat with i = 1 to 9if item i of board is 1 thenadd 1 to play1totelseif item i of board is 2 thenadd 1 to play2totend ifend ifend repeatput play1tot into card field "play1score"put play2tot into card field "play2score"wincheckend updatescoreon wincheckglobal play1tot,play2tot,board,winif play1tot + play2tot > 4 thenput 0 into totadd item 1 of board to totadd item 2 of board to totadd item 3 of board to totif tot is 3 then player1won 1,2,3if tot is 6 then player2won 1,2,3put 0 into totadd item 4 of board to totadd item 5 of board to totadd item 6 of board to totif tot is 3 then player1won 4,5,6if tot is 6 then player2won 4,5,6put 0 into totadd item 7 of board to totadd item 8 of board to totadd item 9 of board to totif tot is 3 then player1won 7,8,9if tot is 6 then player2won 7,8,9put 0 into totadd item 1 of board to totadd item 5 of board to totadd item 9 of board to totif tot is 3 then player1won 1,5,9if tot is 6 then player2won 1,5,9put 0 into totadd item 3 of board to totadd item 5 of board to totadd item 7 of board to totif tot is 3 then player1won 3,5,7if tot is 6 then player2won 3,5,7put 0 into totadd item 1 of board to totadd item 4 of board to totadd item 7 of board to totif tot is 3 then player1won 1,4,7if tot is 6 then player2won 1,4,7put 0 into totadd item 2 of board to totadd item 5 of board to totadd item 8 of board to totif tot is 3 then player1won 2,5,8if tot is 6 then player2won 2,5,8put 0 into totadd item 3 of board to totadd item 6 of board to totadd item 9 of board to totif tot is 3 then player1won 3,6,9if tot is 6 then player2won 3,6,9if (win is 0) and (9 is not in board) thenplay "c"play "a"play "t"put empty into card field 2put empty into card field 1repeat 12put "Cat's Game!" & return after card field 2put "Cat's Game!" & return after card field 1end repeatput 1 into winflash 5exit to hypercardend ifend ifend wincheckon player1won x,y,zdisplaywin x,y,zadd 1 to card field win1scoreput empty into card field 1put empty into card field 2repeat 12put "You win!" & return after card field 1put "You lose!" & return after card field 2end repeatend player1wonon player2won x,y,zdisplaywin x,y,zadd 1 to card field win2scoreput empty into card field 2put empty into card field 1repeat 12put "You win!" & return after card field 2put "You lose!" & return after card field 1end repeatend player2wonon displaywin x,y,zglobal winplay "harpsichord" tempo 120 "c5e gq fe3 ee3 de3 ce gq fe3 ee3 de3 ce gq fe3 ee3 fe3 deq"repeat 5set hilite of card button x to trueset hilite of card button y to trueset hilite of card button z to truese